<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<base href="<%=basePath%>admin/pack/greenteaPacking/guanyinwang/">
	<title>增加包装信息</title>
	<link type="text/css" href="<%=basePath%>admin/pack/css/ui.all.css" rel="stylesheet"/>
	<script type="text/javascript" src="<%=basePath%>admin/pack/js/jquery-1.4.2.min.js"></script>
	<!-- 
	<script type="text/javascript" src="../js/ui.core.js"></script>
	<script type="text/javascript" src="../js/ui.datepicker.js"></script>
	<script type="text/javascript" src="../js/ui.datepicker-zh_CN.js"></script>
	<script type="text/javascript" src="../js/datePicker.js"></script>
	<script type="text/javascript" src="../js/datePicker.js"></script>
	 -->
	<script type="text/javascript" src="<%=basePath%>admin/pack/js/particalPacking.js"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

.STYLE1 {
	font-size: 12px
}

.STYLE4 {
	font-size: 12px;
	color: #1F4A65;
	font-weight: bold;
}

tr {
	height: : 24px;
}

a:link {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}

a:visited {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}

a:hover {
	font-size: 12px;
	color: #FF0000;
	text-decoration: underline;
}

a:active {
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}

.STYLE7 {
	font-size: 12
}
-->
</style>

		<script>
var  highlightcolor='#eafcd5';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var  clickcolor='#51b2f6';
function  changeto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=highlightcolor;
}
}

function  changeback(){
if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

function  clickto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}
</script>
	</head>

<%
	long id = 1;
	if(request.getParameter("semiFinishedProductPackageId") != null)
	{
		id = Long.parseLong(request.getParameter("semiFinishedProductPackageId"));
	}
	int packingFlowId = 1;
	if(request.getParameter("packingFlowId") != null)
	{
		packingFlowId = Integer.parseInt(request.getParameter("packingFlowId"));		
	}
%>

	<body>
		<table width="100%" border="0" align="center" cellpadding="0"
			cellspacing="0">
			<tr>
				<td height="30">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="15" height="30">
								<img src="<%=basePath%>admin/tab/images/tab_03.gif" width="15" height="30" />
							</td>
							<td width="1101" background="<%=basePath%>admin/tab/images/tab_05.gif">
								<img src="<%=basePath%>admin/tab/images/001.gif" width="16" height="16" />
								<span class="STYLE4">增加粒子包装信息</span>
							</td>
							<td width="281" background="<%=basePath%>admin/tab/images/tab_05.gif">&nbsp;
								
							</td>
							<td width="14">
								<img src="<%=basePath%>admin/tab/images/tab_07.gif" width="14" height="30" />
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="9" background="<%=basePath%>admin/tab/images/tab_12.gif">&nbsp;
								
							</td>
							<td bgcolor="#f3ffe3" class="STYLE1">
								<!-- 添加内容 -->
								<form id="addParticalPacking" action="listParticleProduct" method="post">
									<table width="50%" border="0" align="left" bgcolor=""
										onmouseover="changeto()" onmouseout="changeback()">
										<tr>
											<td height="28" colspan="3">
												&nbsp;&nbsp;
												<a href="#" onClick="history.back(); return false;">返回上一步</a>
											</td>
										</tr>
										<tr>
											<td height="24" align="right" style="display: none;">
												半成品编号
											</td>
											<td>
												<input name="semifinishedProductPackage.id" type="hidden" value="<%=id%>"/>
												<input name="packingFlow.packingFlowId" type="hidden" value="<%=packingFlowId%>"/>
											</td>
										</tr>
										<tr height="24">
											<td width="39%" align="right">质量：</td>
											<td width="61%" height="24">
												<select name="particleProduct.quality">
													<option value="优质">优质</option>
													<option value="一般">一般</option>
													<option value="劣质">劣质</option>
												</select>
											</td>
										</tr>
										<tr>
											<td height="24" align="right">重量：</td>
											<td><input type="text" name="particleProduct.weight"/></td>
										</tr>
										<tr>
											<td align="right">包装方式：</td>
											<td><input name="particleProduct.wrapper" type="text"/></td>
										</tr>
										<tr>
											<td align="right">包装时间：</td>
											<td><input name="particleProduct.packTime" type="text"  id="dateDemo"/></td>
										</tr>
										<tr>
											<td height="24" align="right">人员：</td>
											<td><input name="empName" /></td>
											<!-- 
											<td><input name="particleProduct.emps[0].id" /></td>
											 -->
										</tr>
										<tr>
											<td height="24" align="right">设备：</td>
											<td><input name="deviceName" /></td>
											<!-- 
											<td><input name="particleProduct.devices[0].id" /></td>
											 -->
										</tr>
										<tr>
											<td align="right" height="24">备注：</td>
											<td><textarea name="particleProduct.description" rows="6" cols="35"></textarea>
											</td>
										</tr>
										<tr>
											<td colspan="2" align="center">
												<input type="submit" value="提交" />
											</td>
										</tr>
									</table>
									<br>
									<table width="50%" border="0" align="right" bgcolor=""
											onmouseover="changeto()" onmouseout="changeback()">
										<tr>
											<td align="center"><h2>编号列表</h2></td>
										</tr>
										<tr>
											<td height="24" align="center">产生粒茶编号：
												<input id="addNumId" name="particleProductId" type="text"/>
												<input type="button" class="addbutton" onclick="" value="确定增加" />
											</td>
										</tr>
										<tr>
											<td height="24" align="center">删除粒茶编号：
												<input id="delNumId" type="text"/>
												<input type="button" class="delbutton" onclick="" value="确定删除" />
											</td>
										</tr>
										<tr>
											<td>
												<table width="50%" border="1" align="center" bgcolor=""
													onmouseover="changeto()" onmouseout="changeback()">
													<tr>
														<td style="border: 1px">
															<textarea name="particalNums" readonly="readonly" style="overflow-y: scroll;" id="numsId" rows="15" cols="35"></textarea>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</form>
							</td>
							<td width="9" background="<%=basePath%>admin/tab/images/tab_16.gif">&nbsp;</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td height="29">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="15" height="29">
								<img src="<%=basePath%>admin/tab/images/tab_20.gif" width="15" height="29" />
							</td>
							<td background="<%=basePath%>admin/tab/images/tab_21.gif">
								<div align="right">&nbsp;</div>
							</td>
							<td width="14">
								<img src="<%=basePath%>admin/tab/images/tab_22.gif" width="14" height="29" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</body>
</html>